<template>
	<view id="box">
		<view @click="changePassword">
			<text>修改登录密码</text>
			<text class="iconfont icon-xiangyou1"></text>
		</view>
		<view @click="exit">退出登录</view>
	</view>
</template>

<script>
	import {
		computed,
		reactive,
		toRefs
	} from 'vue';

	export default {
		setup() {
			let data = reactive({

				changePassword: () => {
					uni.navigateTo({
						url: '../change_pwd/change_pwd'
					})
				},
				exit: () => {
					wx.showModal({
						title:'确定要退出登陆吗',
						success(res){
							if(res.confirm){
								uni.navigateTo({
									url:"../login/login"
								})
							}
						}

					})
				}
			})


			return {
				...toRefs(data)
			}
		},


	}
</script>

<style>
	@import url("~@/static/font/iconfont.css");

	page {
		background-color: #f2f2f2;
	}

	#box view {
		padding: 0 24rpx;
		margin: 24rpx 0;
		height: 100rpx;
		line-height: 100rpx;
		background-color: white;
	}

	#box>view:last-child {
		text-align: center;
	}

	#box>view:first-child {
		display: flex;
		justify-content: space-between;
	}
</style>
